// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .cs}

//-------------MAIN---------------
0000: NOP 
thread 'SPH' 
0ADF: add_dynamic_GXT_entry "SPHC" text "~r~~h~FORCE ~g~~h~VALUE ~s~~>~~1~%"
if 
   not Actor.Model($PLAYER_ACTOR) == #NULL
jf @PLAYER_OPTIONS_9A01 
09C7: change_player $PLAYER_CHAR model_to #NULL 
0687: clear_actor $PLAYER_ACTOR task 
:PLAYER_OPTIONS_9A01 

 

:SPH_51
wait 0 
if 
   Player.Defined($PLAYER_CHAR)
jf @SPH_51 
if not Actor.Driving($PLAYER_ACTOR)
jf @SPH_51 
 
wait 1500 
0A1F: increase_float_stat 24 by 1000.0 
9@ = 10.0 
11@ = 2.0 
12@ = 0.0 

:SPH_E0
wait 50 
if 
   Player.Defined($PLAYER_CHAR)
jf @SPH_E0 
if not Actor.Driving($PLAYER_ACTOR)
jf @SPH_E0 
if 
04EE:   animation "PARACHUTE" loaded 
jf @SPH_BAE 
0090: 17@ = float 9@ to_integer 
01E5: show_text_1number_highpriority GXT 'SPHC' number 17@ time 500 flag 1 
0819: 16@ = actor $PLAYER_ACTOR distance_from_ground 
06AC: 8@ = actor $PLAYER_ACTOR movement_speed 
gosub @SPH_E5F 
gosub @SPH_BC2 

if 
   not 16@ > 2.0 
jf @SPH_19D 
gosub @SPH_2F0 
jump @SPH_B40 

:SPH_19D
if 
84AD:   not actor $PLAYER_ACTOR in_water 
jf @SPH_B40 
if 
  16@ > 3.0 
jf @SPH_B2B 
Actor.SetImmunities($PLAYER_ACTOR, 1, 1, 1, 1, 1)
if and
   not Actor.Animation($PLAYER_ACTOR) == "FALL_SKYDIVE_ACCEL"
   not Actor.Animation($PLAYER_ACTOR) == "FALL_SKYDIVE"
jf @SPH_21E 
0687: clear_actor $PLAYER_ACTOR task 
12@ = 0.0 
jump @SPH_25B 

:SPH_21E
if 
00E1:   player 0 pressed_key 4 
jf @SPH_2D4 
wait 250 
if 
08B7:   test 10@ bit 12 
jf @SPH_254 
08C3: clear 10@ bit 12 
jump @SPH_25B 

:SPH_254
08BD: set 10@ bit 12 

:SPH_25B
if 
08B7:   test 10@ bit 12 
jf @SPH_2A1 
0812: AS_actor $PLAYER_ACTOR perform_animation "FALL_SKYDIVE" IFP "PARACHUTE" framedelta 1.0 loopA 1 lockX 0 lockY 0 lockF 0 time -1 // versionB 
jump @SPH_2D4 

:SPH_2A1
0812: AS_actor $PLAYER_ACTOR perform_animation "FALL_SKYDIVE_ACCEL" IFP "PARACHUTE" framedelta 1.0 loopA 1 lockX 0 lockY 0 lockF 0 time -1 // versionB 

:SPH_2D4
gosub @SPH_967 
jump @SPH_E0 

:SPH_2F0
if 
00E1:   player 0 pressed_key 16 
jf @SPH_419 
04C4: store_coords_to 21@ 22@ 23@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 1.4 
04C4: store_coords_to 24@ 25@ 26@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 7.6 
if 
06BD:   no_obstacles_between 21@ 22@ 23@ and 24@ 25@ 26@ solid 1 car 1 actor 1 object 1 particle 1 
jf @SPH_419 
20@ = 50
04C4: store_coords_to 21@ 22@ 23@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0 
095C: create_smoke_at 21@ 22@ 23@ velocity 0.0 0.0 0.0 RGBA 0.0 1.0 0.0 1.0 size 9@ last_factor 9@ 

:SPH_3DA
wait 20 
083C: set_actor $PLAYER_ACTOR velocity_in_direction_XYZ 0.0 0.0 9.0 
0819: 16@ = actor $PLAYER_ACTOR distance_from_ground 
if 
04B5:   16@ >= 9.0 // @ >= constant 
jf @SPH_3DA 

:SPH_419
return 

:SPH_967
0494: get_joystick 0 direction_offset_to 1@ 2@ 3@ 4@ 
0093: 1@ = integer 1@ to_float 
0093: 2@ = integer 2@ to_float 
1@ *= 0.02 
006B: 1@ *= 11@ // (float) 
4@ = Actor.Angle($PLAYER_ACTOR)
0063: 4@ -= 1@ // (float) 
1@ *= 4.0 
2@ *= 0.02 
006B: 2@ *= 11@ // (float) 
005B: 12@ += 2@ // (float) 
if 
  -80.0 > 12@ 
jf @SPH_9EC 
12@ = -80.0 

:SPH_9EC
if 
  12@ > 80.0 
jf @SPH_A0B 
12@ = 80.0 

:SPH_A0B
083E: set_actor $PLAYER_ACTOR rotation 12@ 1@ 4@ while_in_air 
5@ = 360.0 
0063: 5@ -= 4@ // (float) 
02F6: 6@ = sine 5@ // (float) 
02F7: 7@ = cosine 5@ // (float) 
006B: 6@ *= 9@ // (float) 
006B: 7@ *= 9@ // (float) 
02F6: 13@ = sine 12@ // (float) 
02F7: 14@ = cosine 12@ // (float) 
006B: 6@ *= 14@ // (float) 
006B: 7@ *= 14@ // (float) 
0087: 15@ = 9@ // (float) 
006B: 15@ *= 13@ // (float) 
083C: set_actor $PLAYER_ACTOR velocity_in_direction_XYZ 6@ 7@ 15@
04C4: store_coords_to 21@ 22@ 23@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0 
095C: create_smoke_at 21@ 22@ 23@ velocity 0.0 0.0 0.0 RGBA 1.0 0.0 1.0 1.0 size 9@ last_factor 9@ 
return 

:SPH_B2B
if 
  8@ > 8.0 
jf @SPH_E0 

:SPH_B40
if or
   Actor.Animation($PLAYER_ACTOR) == "FALL_SKYDIVE_ACCEL"
   Actor.Animation($PLAYER_ACTOR) == "FALL_SKYDIVE"
jf @SPH_E0 
083C: set_actor $PLAYER_ACTOR velocity_in_direction_XYZ 0.0 0.0 0.0 
0687: clear_actor $PLAYER_ACTOR task 
wait 250 
12@ = 0.0 
Actor.Angle($PLAYER_ACTOR) = 4@
jump @SPH_E0 

:SPH_BAE
04ED: load_animation "PARACHUTE" 
jump @SPH_E0 

:SPH_BC2
0087: 25@ = 9@ // (float) 
25@ /= 15.0 
if 
   not 25@ > 1.0 
jf @SPH_BF3 
25@ = 1.0 

:SPH_BF3
if 
   Actor.Animation($PLAYER_ACTOR) == "RUN_PLAYER"
jf @SPH_C23 
0393: actor $PLAYER_ACTOR perform_animation "RUN_PLAYER" at 25@ times_normal_rate 

:SPH_C23
if 
   Actor.Animation($PLAYER_ACTOR) == "SWIM_CRAWL"
jf @SPH_C53 
0393: actor $PLAYER_ACTOR perform_animation "SWIM_CRAWL" at 25@ times_normal_rate 

:SPH_C53
if 
   Actor.Animation($PLAYER_ACTOR) == "RUN_CSAW"
jf @SPH_C7F 
0393: actor $PLAYER_ACTOR perform_animation "RUN_CSAW" at 25@ times_normal_rate 

:SPH_C7F
if 
   Actor.Animation($PLAYER_ACTOR) == "RUN_ROCKET"
jf @SPH_CAF 
0393: actor $PLAYER_ACTOR perform_animation "RUN_ROCKET" at 25@ times_normal_rate 

:SPH_CAF
if 
   Actor.Animation($PLAYER_ACTOR) == "RUN_ARMED"
jf @SPH_CDD 
0393: actor $PLAYER_ACTOR perform_animation "RUN_ARMED" at 25@ times_normal_rate 

:SPH_CDD
if 
   Actor.Animation($PLAYER_ACTOR) == "FIGHTA_1"
jf @SPH_D09 
0393: actor $PLAYER_ACTOR perform_animation "FIGHTA_1" at 25@ times_normal_rate 

:SPH_D09
if 
   Actor.Animation($PLAYER_ACTOR) == "FIGHTA_2"
jf @SPH_D35 
0393: actor $PLAYER_ACTOR perform_animation "FIGHTA_2" at 25@ times_normal_rate 

:SPH_D35
if 
   Actor.Animation($PLAYER_ACTOR) == "FIGHTA_3"
jf @SPH_D61 
0393: actor $PLAYER_ACTOR perform_animation "FIGHTA_3" at 25@ times_normal_rate 

:SPH_D61
if 
   Actor.Animation($PLAYER_ACTOR) == "FIGHTA_G"
jf @SPH_D8D 
0393: actor $PLAYER_ACTOR perform_animation "FIGHTA_G" at 25@ times_normal_rate 

:SPH_D8D
if 
   Actor.Animation($PLAYER_ACTOR) == "SWIM_UNDER"
jf @SPH_DBD 
0393: actor $PLAYER_ACTOR perform_animation "SWIM_UNDER" at 25@ times_normal_rate 

:SPH_DBD
return 

:SPH_E5F
if or
80E1:   not player 0 pressed_key 16 
00E1:   player 0 pressed_key 17 
jf @SPH_E94 
if or
80E1:   not player 0 pressed_key 17 
00E1:   player 0 pressed_key 16 
jf @SPH_EC4 
jump @SPH_EED 

:SPH_E94
9@ -= 2.0 
if 
  5.0 > 9@ 
jf @SPH_EED 
9@ = 5.0 
jump @SPH_EED 

:SPH_EC4
9@ += 2.0 
if 
  9@ > 200.0 
jf @SPH_EED 
9@ = 200.0 

:SPH_EED
 
return 
end_thread 